import 'package:FineArt/utils/size_config.dart';
import 'package:flutter/material.dart';
import 'package:FineArt/constants.dart';

class RoundedText extends StatelessWidget {
  final String label;
  final Function press;
  final Color backgroundColor, textColor;
  final Decoration decoration;
  final bool selected;
  final int fontSize;
  static const  BoxDecoration _boxDecoration=BoxDecoration(

  );
  const
  RoundedText({
    Key key,
    this.label,
    this.press,
    this.backgroundColor = bg_input,
    this.textColor = Colors.white,
    this.decoration= _boxDecoration,
    this.selected,
    this.fontSize = 13
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Center(
      child: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 4),
        child: ClipRRect(
          borderRadius: BorderRadius.circular(15),
          child: Container(
            color:selected?category_bg_selected:category_bg_unselected,
            padding: EdgeInsets.symmetric(vertical: 5,horizontal: 8),
            child: InkWell(
              onTap: press,
              child:Text(
              label,
              style: TextStyle(
                color: selected?category_text_selected:category_text_unselected,
                fontSize:setSp(fontSize)
              ),
            ),
            ),
          ),
        ),
      ),
    );
  }
}
